#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   app.py
@Time    :   2020/09/30 10:44:55
@Author  :   fengzhilaoling 
@Version :   1.0
@Contact :   fengzhilaoling@163.com
'''
from flask import Flask
import logging


app = Flask(__name__)
handler = logging.FileHandler('flask.log')
formatter= logging.Formatter("%(asctime)s - %(message)s")
handler.setFormatter(formatter)
app.logger.addHandler(handler)


@app.route('/index/')
def index():
    app.logger.error('aa')
    return 'index'


if __name__ == "__main__":
    app.run(debug=False)